3.4.1 \(\int (a+a \sin (e+f x))^2 \sqrt {c-c \sin (e+f x)} \, dx\) [301]

Optimal. Leaf size=36 \[ \frac {2 a^2 c^3 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}} \]

[Out]

2/5*a^2*c^3*cos(f*x+e)^5/f/(c-c*sin(f*x+e))^(5/2)

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {2815, 2752} \begin {gather*} \frac {2 a^2 c^3 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^2*Sqrt[c - c*Sin[e + f*x]],x]

[Out]

(2*a^2*c^3*Cos[e + f*x]^5)/(5*f*(c - c*Sin[e + f*x])^(5/2))

Rule 2752

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[b*(g*C
os[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^(m - 1)/(f*g*(m - 1))), x] /; FreeQ[{a, b, e, f, g, m, p}, x] && Eq
Q[a^2 - b^2, 0] && EqQ[2*m + p - 1, 0] && NeQ[m, 1]

Rule 2815

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0,
 n, m] || LtQ[m, n, 0]))

Rubi steps

\begin {align*} \int (a+a \sin (e+f x))^2 \sqrt {c-c \sin (e+f x)} \, dx &=\left (a^2 c^2\right ) \int \frac {\cos ^4(e+f x)}{(c-c \sin (e+f x))^{3/2}} \, dx\\ &=\frac {2 a^2 c^3 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(73\) vs. \(2(36)=72\).
time = 0.16, size = 73, normalized size = 2.03 \begin {gather*} \frac {2 a^2 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^5 \sqrt {c-c \sin (e+f x)}}{5 f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^2*Sqrt[c - c*Sin[e + f*x]],x]

[Out]

(2*a^2*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^5*Sqrt[c - c*Sin[e + f*x]])/(5*f*(Cos[(e + f*x)/2] - Sin[(e + f*x
)/2]))

________________________________________________________________________________________

Maple [A]
time = 1.32, size = 49, normalized size = 1.36

method result size
default \(-\frac {2 \left (\sin \left (f x +e \right )-1\right ) c \left (1+\sin \left (f x +e \right )\right )^{3} a^{2}}{5 \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) \(49\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^2*(c-c*sin(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-2/5*(sin(f*x+e)-1)*c*(1+sin(f*x+e))^3*a^2/cos(f*x+e)/(c-c*sin(f*x+e))^(1/2)/f

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(c-c*sin(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate((a*sin(f*x + e) + a)^2*sqrt(-c*sin(f*x + e) + c), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 123 vs. \(2 (34) = 68\).
time = 0.34, size = 123, normalized size = 3.42 \begin {gather*} -\frac {2 \, {\left (a^{2} \cos \left (f x + e\right )^{3} + 3 \, a^{2} \cos \left (f x + e\right )^{2} - 2 \, a^{2} \cos \left (f x + e\right ) - 4 \, a^{2} + {\left (a^{2} \cos \left (f x + e\right )^{2} - 2 \, a^{2} \cos \left (f x + e\right ) - 4 \, a^{2}\right )} \sin \left (f x + e\right )\right )} \sqrt {-c \sin \left (f x + e\right ) + c}}{5 \, {\left (f \cos \left (f x + e\right ) - f \sin \left (f x + e\right ) + f\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(c-c*sin(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

-2/5*(a^2*cos(f*x + e)^3 + 3*a^2*cos(f*x + e)^2 - 2*a^2*cos(f*x + e) - 4*a^2 + (a^2*cos(f*x + e)^2 - 2*a^2*cos
(f*x + e) - 4*a^2)*sin(f*x + e))*sqrt(-c*sin(f*x + e) + c)/(f*cos(f*x + e) - f*sin(f*x + e) + f)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{2} \left (\int 2 \sqrt {- c \sin {\left (e + f x \right )} + c} \sin {\left (e + f x \right )}\, dx + \int \sqrt {- c \sin {\left (e + f x \right )} + c} \sin ^{2}{\left (e + f x \right )}\, dx + \int \sqrt {- c \sin {\left (e + f x \right )} + c}\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**2*(c-c*sin(f*x+e))**(1/2),x)

[Out]

a**2*(Integral(2*sqrt(-c*sin(e + f*x) + c)*sin(e + f*x), x) + Integral(sqrt(-c*sin(e + f*x) + c)*sin(e + f*x)*
*2, x) + Integral(sqrt(-c*sin(e + f*x) + c), x))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 107 vs. \(2 (34) = 68\).
time = 0.51, size = 107, normalized size = 2.97 \begin {gather*} -\frac {\sqrt {2} {\left (10 \, a^{2} \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 5 \, a^{2} \cos \left (-\frac {3}{4} \, \pi + \frac {3}{2} \, f x + \frac {3}{2} \, e\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + a^{2} \cos \left (-\frac {5}{4} \, \pi + \frac {5}{2} \, f x + \frac {5}{2} \, e\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \sqrt {c}}{10 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(c-c*sin(f*x+e))^(1/2),x, algorithm="giac")

[Out]

-1/10*sqrt(2)*(10*a^2*cos(-1/4*pi + 1/2*f*x + 1/2*e)*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e)) + 5*a^2*cos(-3/4*pi +
 3/2*f*x + 3/2*e)*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e)) + a^2*cos(-5/4*pi + 5/2*f*x + 5/2*e)*sgn(sin(-1/4*pi + 1
/2*f*x + 1/2*e)))*sqrt(c)/f

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int {\left (a+a\,\sin \left (e+f\,x\right )\right )}^2\,\sqrt {c-c\,\sin \left (e+f\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sin(e + f*x))^2*(c - c*sin(e + f*x))^(1/2),x)

[Out]

int((a + a*sin(e + f*x))^2*(c - c*sin(e + f*x))^(1/2), x)

________________________________________________________________________________________